package com.sugar.queryinfo.module.business.api.bi.dto.req.sjzwsj;

import com.sugar.queryinfo.module.business.api.bi.core.BackInvestBasicApi;
import com.sugar.queryinfo.module.business.api.bi.core.dto.ApiReqVO;
import lombok.Data;

import javax.validation.constraints.NotBlank;

@Data
public class ZCI040ReqVO implements ApiReqVO {

    /**
     * 姓名
     */
    @NotBlank(message = "姓名不能为空")
    private String name;

    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空")
    private String phone;

    /**
     * 是否取得用户授权（0:否，1:是）
     */
    private String authorized = "1";

    @Override
    public void encrypt() {
        this.name = BackInvestBasicApi.encrypt(this.name);
        this.phone = BackInvestBasicApi.encrypt(this.phone);
    }
}
